import Book.BookList;
import User.*;

import java.util.Scanner;

/**
 * Created by xiebang
 * Description
 * User:小谢
 * Date:2021-12-24
 * Time:11:25
 */
public class Main {
    public static User login(){
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入你的姓名:");
        String name = scanner.nextLine();
        System.out.println("请输入你的身份:1.管理员  0.普通会员");
        int choice = scanner.nextInt();
        if (choice == 1){
            return new Admin(name);
        }else {
            return new Nomal(name);
        }
    }

    public static void main(String[] args) {
        User user = login();
        BookList bookList = new BookList();
        while (true) {
            int chioce = user.menu();
            user.DoOpearation(chioce, bookList);
        }
    }
}
